const fs = require('fs');


let user = { username:"admin11",password:"12345" }


let result = fs.readFileSync('persons.json').toString();

let arr = JSON.parse(result);

let al = arr.find((item) => item.username === user.username && item.password === user.password)
    console.log(al !== undefined ? '登录成功' : '用户名或密码错误');